﻿namespace MSSqlSchemaDoc.Core.DataStructures
{
    using System.Xml.Serialization;

    /// <summary>
    /// Represents a single set of column key pairs referencing each other in a foreign key constraint.
    /// </summary>
    public class ForeignKeyColumnPair
    {
        /// <summary>
        /// Gets or sets the ID of the referencing column.
        /// </summary>
        [XmlIgnore()]
        public int ReferencingColumnId { get; set; }
        
        /// <summary>
        /// Gets or sets the name of the referencing column.
        /// </summary>
        [XmlAttribute()]
        public string ReferencingColumnName { get; set; }
        
        /// <summary>
        /// Gets or sets the ID of the referenced column.
        /// </summary>
        [XmlIgnore()]
        public int ReferencedColumnId { get; set; }

        /// <summary>
        /// Gets or sets the name of the referenced column.
        /// </summary>
        [XmlAttribute()]
        public string ReferencedColumnName { get; set; }

        /// <summary>
        /// Gets or sets the name of the referenced table.
        /// </summary>
        [XmlAttribute()]
        public string ReferencedTableName { get; set; }
    }
}
